package ludowork.core;

public class Manager {

    public static final int SUCCESS = 0;
    public static final int CANCELED = 1;
    public static final int FAILED = 2;

    public static Manager getManager() {
        return singleManger;
    }

    public void setImageSource(ImageSource imageSource) {
        this.imageSource = imageSource;
        if(imageStore!=null){
            imageStore.setImageSource(imageSource);
        }
    }

    public ImageSource getImageSource() {
        return imageSource;
    }

    public void setLogger(Logger logger) {
        this.logger = logger;
    }

    public Logger getLogger() {
        return logger;
    }

    public void setImageStore(ImageStore imageStore) {
        this.imageStore = imageStore;
    }

    public ImageStore getImageStore() {
        return imageStore;
    }

    private Manager() {
        imageSource = null;
        imageStore = null;
    }
    private ImageSource imageSource;
    private ImageStore imageStore;
    private Logger logger;
    private static Manager singleManger = new Manager();
}
